const axios = require('axios')
function httprequest(options) {
  const { success, fail } = options
  axios(options)
    .then((res) => {
      success(res)
    })
    .catch((err) => {
      fail(err)
    })
}
module.exports = httprequest